package mx.com.mindbits.bandpay.utils;

import mx.com.mindbits.bandpay.R;
import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

public class CustomToastNotification {	
	public static Toast customMessage(String message, Context context){
		LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);		
		View layout = inflater.inflate(R.layout.custom_toast_layout, null);
		TextView bodyMessage = (TextView)layout.findViewById(R.id.customToastText);
		bodyMessage.setText(message);
		
		Toast customToast = new Toast(context);
		customToast.setDuration(Toast.LENGTH_LONG);
		customToast.setGravity(Gravity.CENTER_HORIZONTAL, 0, 0);
		customToast.setView(layout);
		
		return customToast;
	}
}
